package com.example.paging3samples.database.mapper

import com.example.paging3samples.database.model.PostEntity
import com.example.paging3samples.network.model.anime.Post

/**
 * author: LiLiang
 * createTime: 2022/9/15-12:29
 * remark:
 **/

fun PostEntity.toPost(): Post {
    return Post(
        id = id,
        preview = preview,
        width = width,
        height = height
    )
}

fun Post.toPostEntity(): PostEntity {
    return PostEntity(
        id = id,
        preview = preview,
        width = width,
        height = height
    )
}